import Request from "@/util/request.js";

const apiRequest = new Request();

// 获取分类列表
export const getCategoryListApi = async (data) => {
    return await apiRequest.post("/api/product.category/index", data);
}

// 获取分类Picker
export const categoryPickerApi = async (data) => {
    return await apiRequest.post("/api/product.category/picker", data);
}

// 创建分类
export const createCategoryApi = async (data) => {
    return await apiRequest.post("/api/product.category/create", data);
}

// 编辑分类
export const updateCategoryApi = async (data) => {
    return await apiRequest.post("/api/product.category/save", data);
}

// 删除分类
export const deleteCategoryApi = async (data) => {
    return await apiRequest.post("/api/product.category/delete", data);
}
